package com.ghpt.service.impl;
import com.ghpt.mapper.HaiShangMapper;
import com.ghpt.pojo.HaiShang;
import com.ghpt.service.HaiShangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HaiShangServiceImpl implements HaiShangService {
    @Autowired
    private HaiShangMapper haiShangMapper;

    @Override
    public HaiShang findHaiShangById(Long id) {
        if (id != null) {
            return haiShangMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(HaiShang haiShang) {
        return haiShangMapper.updateById(haiShang);//更新成功为1否则为0
    }
}
